package lesson01;

import java.awt.*;

public class TestBorderLayout {
    public static void main(String[] args) {
        Frame frame=new Frame();
        //组件-按钮
        Button east = new Button("east");
        Button button2 = new Button("west");
        Button button3 = new Button("south");
        Button button4 = new Button("north");
        Button button5 = new Button("center");
        //设置流式布局
        //frame.setLayout(new FlowLayout());
//        frame.setLayout(new FlowLayout(FlowLayout.LEFT));
        //把按钮加上去
        frame.add(east,BorderLayout.EAST);
        frame.add(button2,BorderLayout.WEST);
        frame.add(button3,BorderLayout.SOUTH);
        frame.add(button4,BorderLayout.NORTH);
        frame.add(button5,BorderLayout.CENTER);
        frame.setSize(200,200);
        frame.setVisible(true);

    }
}
